package com.czy.owner.api;


import com.czy.owner.net.api.BaseApi;
import com.czy.owner.net.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;
import java.util.HashMap;
import retrofit2.Retrofit;
import rx.Observable;

/**
 * Created by wangyang on 2017/5/10 0010.
 */

public class LogisticsApi extends BaseApi {
    private String session;
    private String userOrderId;
//    private String name;
//    private String numbers;
//    private String goodsIds;


    public LogisticsApi(HttpOnNextListener listener, RxAppCompatActivity rxAppCompatActivity) {
        super(listener, rxAppCompatActivity);
        setCache(false);
        setShowProgress(true);
    }

    public String getSession() {
        return session;
    }

    public void setSession(String session) {
        this.session = session;
    }

    public String getUserOrderId() {
        return userOrderId;
    }

    public void setUserOrderId(String userOrderId) {
        this.userOrderId = userOrderId;
    }

    //    public String getName() {
//        return name;
//    }
//
//    public void setName(String name) {
//        this.name = name;
//    }
//
//    public String getNumbers() {
//        return numbers;
//    }
//
//    public void setNumbers(String numbers) {
//        this.numbers = numbers;
//    }
//
//    public String getGoodsIds() {
//        return goodsIds;
//    }
//
//    public void setGoodsIds(String goodsIds) {
//        this.goodsIds = goodsIds;
//    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService service = retrofit.create(HttpPostService.class);
        HashMap<String, Object> map = new HashMap<>();
        map.put("session", getSession());
        map.put("userOrderId",getUserOrderId());
//        map.put("name", getName());
//        map.put("numbers", getNumbers());
//        map.put("goodsIds", getGoodsIds());
        return service.getLogisticsInfoApi(map);
    }

}
